/*
* @file    :drv_gpio.h
* @author  :LingFengLu
* @date    :2023-06-06
*/

#ifndef _DRV_GPIO_H_
#define _DRV_GPIO_H_

#include "global.h"
#include "bluenrg_lp_evb_config.h"
//Constant definition    宏定义
#define DRV_GPIO_MASK_PORT		0xF0
#define DRV_GPIO_MASK_PIN		0x0F
#define GPIO_CHANNEL(port,pin)  (((port & 0x0F) << 4)|((pin & 0x0F)))
//Type definition    类型定义

typedef enum
{
	PORT_A = 0,
	PORT_B ,
	PORT_COUNT 
}drv_gpio_port;

typedef enum
{
	PIN0 = 0,
	PIN1,
	PIN2,
	PIN3,
	PIN4,
	PIN5,
	PIN6,
	PIN7,
	PIN8,
	PIN9,
	PIN10,
	PIN11,
	PIN12,
	PIN13,
	PIN14,
	PIN15,
	PIN_COUNT
}drv_gpio_pin;

typedef enum
{
	MODE_INPUT_NO = 0,
	MODE_INPUT_UP ,
	MODE_INPUT_DOWN ,
	MODE_ANALO ,
	
	MODE_OUTPUT_NO ,
	MODE_OUTPUT_UP ,
	MODE_OUTPUT_DOWN ,
	
	
}drv_gpio_mode;




//Function declaration    函数申明
void DrvGpio_Init(void) ;
void DrvGpio_Set
(
uint8 u8_Channel,
uint32 u32_Mode,
uint8 u8_Value
);
uint8 DrvGpio_InGet
(
uint8 u8_Channel
);
//Golbal variable declaration   全局变量申明










#endif

